import { defHttp } from "/@/utils/http/axios";

enum Api {
  //账务 - 支付合并 - 列表
  paymentList   = '/accountBatch/paymentList',
  //账务 - 支付合并 - 列表
  paymergeList  = '/accountBatch/paymergeList',
  //账务 - 支付合并 - 表单
  paymentSelect = '/accountBatch/paymentSelect',
  //账务 - 支付合并 - 提交
  paymentSubmit = '/accountBatch/paymentSubmit',
  
  //审核 - 业务信息
  getRecordById   =  '/accountBatch/getRecordById',
  //审核 - 收支明细
  loadAccountFlow = '/accountBatch/loadAccountFlowIds',
  //审核 - 收支明细
  loadAccount = '/accountBatch/loadAccountIds',
  //审核 - 银行流水
  loadBankRunning = '/bankRunning/loadBankRunning',
  //审核 - 审核
  audit = '/accountBatch/audit',
}

/**
 * 账务 - 支付合并 - 列表
 * @param params
 */
export const paymergeList = (params) => defHttp.get({url: Api.paymergeList, params}, {joinParamsToUrl: true});


/**
 * 账务 - 支付合并 - 列表
 * @param params
 */
export const paymentList = (params) => defHttp.get({url: Api.paymentList, params}, {joinParamsToUrl: true});

/**
 * 账务 - 合并支付表单
 * @param params
 */
export const paymentSelect = (params) => defHttp.post({url: Api.paymentSelect, params});

/**
 * 账务 - 合并支付提交
 * @param params
 */
export const paymentSubmit = (params) => {
  return defHttp.post({url: Api.paymentSubmit, params, timeout: 60000}, {isTransformResponse:false});
}

/**
 * 审核 - 业务信息
 * @param params
 */
export const getRecordById = (params) => defHttp.get({url: Api.getRecordById, params},{isTransformResponse:false});

/**
 * 审核 - 业务信息
 * @param params
 */
export const loadAccountFlow = (params) => defHttp.post({url: Api.loadAccountFlow, params},{isTransformResponse:false});

/**
 * 审核 - 业务信息
 * @param params
 */
export const loadAccount = (params) => defHttp.post({url: Api.loadAccount, params},{isTransformResponse:false});

/**
 * 审核 - 业务信息
 * @param params
 */
export const loadBankRunning = (params) => defHttp.get({url: Api.loadBankRunning, params},{isTransformResponse:false});

/**
 * 审核 - 初始化数据
 * @param params
 */
export const audit = (params) => defHttp.get({url: Api.audit, params}, {isTransformResponse:false});